﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Net;
namespace WFAExamAuto.SysOperate
{
    public partial class FrmUpdatePassword : Form
    {
        public FrmMain fmain;
        public FrmUpdatePassword()
        {
            InitializeComponent();
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            if (tboxNewPassword.Text != tboxNewPassword2.Text)
            {
                MessageBox.Show("两次输入新密码不一致");
            }
            else
            {
                    string s =fmain.Ns.ChangePassword(tboxPassword.Text, tboxNewPassword.Text);
                    if (s == null)
                    MessageBox.Show("请求超时");
                      else if (s == "")
                      {
                        MessageBox.Show("修改成功");
                      }
                       else
                       MessageBox.Show(s);
            }   
        }

        private void btnQuit_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
